package com.example.ui_view;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Result2Activity extends AppCompatActivity {
    Button btn_back;
    TextView tv_result;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result2);
        btn_back=findViewById(R.id.btn_back);
        tv_result=findViewById(R.id.tv_result);
        final Intent intent = getIntent();
        Bundle bundle = intent.getExtras();
        tv_result.setText(bundle.getString("str_key")+"     "+bundle.getInt("int_key"));
        btn_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent reIntent = new Intent(Result2Activity.this,ForRessultActivity.class);
                Bundle reBundle = new Bundle();
                reBundle.putString("id","1830416黄义国");
                reIntent.putExtras(reBundle);
                setResult(0x1011,reIntent);
                finish();
            }
        });
    }
}
